package com.yellowframework.cloud.domain.security.response;

import com.yellowframework.cloud.common.model.response.CommonCode;
import com.yellowframework.cloud.common.model.response.ResponseResult;
import com.yellowframework.cloud.common.model.response.ResultCode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * Created by mrt on 2018/5/21.
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class JwtResult extends ResponseResult {
    public JwtResult(ResultCode resultCode, String jwt) {
        super(resultCode);
        this.jwt = jwt;
    }
    private String jwt;

    public static JwtResult success(String jwt){
        return new JwtResult(CommonCode.SUCCESS, jwt);
    }

}
